﻿using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace Constriction
{
    public class Goal
    {
        public const int GOAL_WIDTH = 16;
        public const int GOAL_HEIGHT = 16;

        public Texture2D tex;
        public Rectangle boundedBox;

        public Goal()
        {
            boundedBox = new Rectangle(0, 0, GOAL_WIDTH, GOAL_HEIGHT);
            ChangePosition();
        }

        public void ChangePosition()
        {
            boundedBox.X = MainGame.rand.Next(MainGame.WALL_SIZE, MainGame.SCREEN_WIDTH - MainGame.WALL_SIZE - GOAL_WIDTH);
            boundedBox.Y = MainGame.rand.Next(MainGame.WALL_SIZE, MainGame.SCREEN_HEIGHT - MainGame.WALL_SIZE - GOAL_HEIGHT);
        }

        public void Draw(SpriteBatch batch)
        {
            batch.Draw(tex, boundedBox, Color.White);
        }
    }
}
